﻿namespace Calculator
{
    internal class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Enter two numbers: ");
            double num1 = Convert.ToDouble(Console.ReadLine());
            double num2 = Convert.ToDouble(Console.ReadLine());

            Console.WriteLine("Enter the operator: ");
            switch(Console.ReadLine())
            {
                case "+":
                    Console.WriteLine($"{num1} + {num2} = " + (num1 + num2));
                    break;
                case "-":
                    Console.WriteLine($"{num1} - {num2} = " + (num1 - num2));
                    break;
                case "*":
                    Console.WriteLine($"{num1} X {num2} = " + (num1 * num2));
                    break;
                case "/":
                    if (num2 == 0) { Console.Error.WriteLine("Error"); return ; }
                    Console.WriteLine($"{num1} / {num2} = " + (num1 / num2));
                    break;
                default:
                    Console.WriteLine("Unexpected operation");
                    break;
            }
            return;
        }
    }
}